/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "stdafx.h"
#include "设置部件窗口.h"
#include <UI/ui从属性数据创建组件.h>


static C_Widget* g_设置窗口 = nullptr;


static void on_多页面布局(C_Widget* self, C_Widget** w, uint32 num) {


}



C_Widget* f_创建设置窗口根组件(S_UI渲染环境& ctx) {
	auto p = f_ui_创建组件(&ctx);
	p->mf_布局 = on_多页面布局;
	p->m_是否延展 = { true, true };
	


	std::vector<S_Props> props;
	S_Props prop = f_alloc_RgbaProp(&S_UI主题::uic_数值编辑框背景, u"数值编辑框背景");
	prop.m_私有 = true;
	props.push_back(prop);
	prop = f_alloc_RgbaProp(&S_UI主题::uic_页面标签, u"页面标签");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_菜单条背景, u"菜单条背景");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_菜单背景, u"菜单背景");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_菜单项, u"菜单项");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_焦点色, u"菜单焦点色");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_文字颜色, u"文字颜色");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_页面标签, u"页面标签");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_分割手柄, u"分割手柄");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_滚动条按钮, u"滚动条按钮");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_面板边, u"滚动条边");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_滚动条, u"滚动条");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_行编辑框背景, u"行编辑框背景");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_行编辑框边框, u"行编辑框边框");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_行编辑框焦点, u"行编辑框焦点");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_行编辑框光标, u"行编辑框光标");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_行编辑框选框, u"行编辑框选框");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_编辑框行号, u"编辑框行号");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_数值编辑框背景, u"数值编辑框背景");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_列表行A, u"列表行A");
	prop.m_私有 = true;
	props.push_back(prop);

	prop = f_alloc_RgbaProp(&S_UI主题::uic_列表行B, u"列表行B");
	prop.m_私有 = true;
	props.push_back(prop);



	auto 颜色 = f_ui_formProp创建纵向布局(ctx, props);


	std::vector<C_Widget*> ws = { 颜色, p };
	auto* root = f_ui_创建多页面(ctx, E_方向::e_横向, ws);
	//f_ui_多页面添加页面(temp, new C_Widget(ctx));
	return root;
}





